package com.itheima.myException;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Demo1 {
    public static void main(String[] args) throws ParseException {
        method01();
    }

    private static void method01() throws ParseException {
        String s = "2020-09-24";

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date parse = simpleDateFormat.parse(s);
        System.out.println("parse = " + parse);
    }
}
